package oop3.src.polymorohic_demo;

public class Keyboard implements polymorohic_demo.USB {
    private String name;

    public Keyboard() {
    }

    public Keyboard(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void connect() {
        System.out.println(name +  "键盘已经成功接入电脑");
    }

    public void kayDown(){
        System.out.println("实现了按键功能");
    }

    @Override
    public void unconnect() {
        System.out.println(name + "已经移除");
    }
}
